<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<style>
	.Hunter-time-picker {
		width: 670px;
	}
</style>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<div class="form-group">
								<div class="container">
								<label class="col-sm-2 control-label">规则类型：</label>
								<div class="col-sm-9">
									<label class="radio-inline">
										<input type="radio" onclick="changeDiv(1)" name="type" value="1" checked /> 月租
									</label>
									<label class="radio-inline">
										<input type="radio" onclick="changeDiv(2)" name="type" value="2" /> 季租
									</label>
									<label class="radio-inline">
										<input type="radio" onclick="changeDiv(3)" name="type" value="3" /> 年租
									</label>
									<label class="radio-inline">
										<input type="radio" onclick="changeDiv(4)" name="type" value="4" /> 临时车
									</label>
								</div>
								</div>
							</div>
                        <div id="fixedFeeDiv">
							<div class="form-group">
								<div class="container">
								<label class="col-sm-2 control-label">金额（元）：</label>
								<div class="col-sm-9">
									<input id="amt" name="amt" class="form-control" type="text" placeholder="单位元">
								</div>
								</div>
							</div>
							<div class="form-group">
								<div class="container">
									<label class="col-sm-2 control-label">规则名称：</label>
									<div class="col-sm-9">
										<input name="ruleName" id="otherRuleName" maxlength="20"  class="form-control" type="text" placeholder="请输入月租收费规则名称">
									</div>
								</div>
							</div>
							<div class="form-group">
								<div class="container">
									<div style="float:right;padding-right:15px">
										<button type="submit" class="btn btn-primary">提交</button>
									</div>
								</div>
							</div>
						</div>
						<div id="dyFeeDiv" style="display:none">
							<div class="form-group">
								<div class="container">
								<label class="col-sm-2 control-label">规则名称：</label>
								<div class="col-sm-9">
									<input id="ruleName" maxlength="20"  class="form-control" type="text" placeholder="请输入临时收费规则名称">
								</div>
								</div>
							</div>
							<div class="form-group">
                                <div class="container" >
									<button  type="button"  onclick="addSegment()" class="btn btn-primary" style="margin-left:15px">添加时间段</button>
									<button  type="button"  onclick="clearAll()" class="btn btn-danger">全部清除</button>
								</div>
							</div>
                            <div class="form-group" style="margin-left:0px;padding-right:20px">
                                <div class="container">
                                    <table class="table table-striped" style="margin-top:-10px;">
                                        <thead>
                                        <tr>
                                            <th>时间区间</th>
                                            <th>开始</th>
                                            <th>结束</th>
                                            <th>收费（元）</th>
											<th>操作</th>
                                        </tr>
                                        </thead>
                                        <tbody id="t_body"></tbody>
                                    </table>
                                </div>
                            </div>
							<div class="form-group" style="margin-left:0px;padding-right:20px">
								<div class="container">
									<div style="float:right;">
										<button  type="button" id="dyFeeBtn" onclick="dyFeeBtnFun()" class="btn btn-primary">提交</button>
									</div>
								</div>
						    </div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>

	<div class="modal fade" id="segModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
						&times;
					</button>
					<h4 class="modal-title">
                        添加时间段
					</h4>
				</div>
				<div class="modal-body container">
					<div class="row" style="padding-top:0px;padding-bottom:10px;margin-top:-20px">
						<label class="col-sm-3 control-label" style="text-align:right;height:30px;line-height:30px"> 免费时长（分钟）：</label>
						<div class="col-sm-4" style="text-align:left">
							<input  id="freeMinInput"  class="form-control" onkeyup="checkMin()" type="text" value="0"/>
						</div>
					</div>
                    <div class="row" style="padding-top:5px;padding-bottom:5px">
                        <label class="col-sm-3 control-label" style="text-align:right;height:30px;line-height:30px">  起始（小时）：</label>
                        <div class="col-sm-4" style="text-align:left">
                            <input  id="usSectionStartTime" readonly class="form-control" type="text" />
                        </div>
                    </div>
                    <div class="row" style="padding-top:5px;padding-bottom:5px">
                        <label class="col-sm-3 control-label" style="text-align:right;height:30px;line-height:30px"> 结束（小时）：</label>
                        <div class="col-sm-4" style="text-align:left">
                            <input  id="usSectionEndTime" readonly class="form-control" type="text"/>
                        </div>
                    </div>
                    <div class="row" style="padding-top:5px;padding-bottom:5px">
                        <label class="col-sm-3 control-label" style="text-align:right;height:30px;line-height:30px"> 收费金额（元）：</label>
                        <div class="col-sm-4" style="text-align:left">
                            <input  id="cashInput" type="input" max-length="6"  class="form-control" type="number"/>
                        </div>
                    </div>
				</div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" id="closeBtn" data-dismiss="modal">关闭</button>
                    <button type="button" onclick="addSegBtn()" class="btn btn-primary">添加</button>
                </div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/appjs/car/carPriceRule/add.js">
	</script>
</body>
</html>
